package calculadora;

import static org.junit.Assert.*;
import junit.framework.TestCase;

import org.junit.Before;
import org.junit.Test;

public class CalculadoraTest extends TestCase {
	private Calculadora instancia = null;

	@Before
	public void setUp() throws Exception {
		instancia = new Calculadora();
	}

	@Test
	public void testCalculadora() {
		assertNotNull(instancia);
	}

	@Test
	public void testGehitu() {
		System.out.println("Gehitu");
		double n1 = 0.0;
		double n2 = 0.0;
		double expResult = 0.0;
		assertEquals(0.0, instancia.gehitu(n1, n2));
	}

	@Test
	public void testKendu() {
		System.out.println("Kendu");
		double n1 = 0.0;
		double n2 = 0.0;
		double expResult = 0.0;
		assertEquals(0.0, instancia.kendu(n1, n2));
	}

	@Test
	public void testBiderkatu() {
		System.out.println("Biderkatu");
		double n1 = 0.0;
		double n2 = 0.0;
		double expResult = 0.0;
		double result = 0.0;
		assertEquals(0.0, instancia.biderkatu(n1, n2));
	}

	@Test
	public void testZatitu() {
		System.out.println("Zatitu");
		double n1 = 0.0;
		double n2 = 0.0;
		double expResult = 0.0;
		assertEquals(0.0, instancia.zatitu(n1, n2));
	}

	/*
	 * 0 la base || 0 el exponente || ambos 0 || Normal
	 */
	public void testPotentzia() {
		System.out.println("Potentzia");
		double base = 0.0;
		double exponente = 0.0;
		assertEquals(1.0, instancia.potentzia(base, exponente));
		base = 0.0;
		exponente = 5.0;
		assertEquals(0.0, instancia.potentzia(base, exponente));
		base = 5.0;
		exponente = 0.0;
		assertEquals(1.0, instancia.potentzia(base, exponente));
		base = 5.0;
		exponente = 2.0;
		assertEquals(25.0, instancia.potentzia(base, exponente));
	}

}
